<template>

  <lay-carousel v-model="active" v-if="data.length>0">
    <lay-carousel-item   v-for="(item,index) in data" :id="index+''" :key="index">
    <a :href="item.url"  :title="item.title" target="_blank"><img  :src="item.pict_url" style="width:100%;height:100%"></a>
    </lay-carousel-item>
  </lay-carousel>

</template>
<script lang="ts">
export default {
    name:'taobao',

}
</script>
<script lang="ts" setup>
import { ref } from "vue";
import http from 'webosutils/lib/http';
const active = ref("0");
const data = ref([]) as any;
const init = () => {
    http.post("/v1/api/portalsite/getTaoBao", { page: 1, limit: 12 }).then(res => {
        data.value=Object.freeze( res.data);
   
    }).catch(res => {

    });

}

    init();


</script>